package com.flyduck.mall.oms.admin.vo;

import com.flyduck.mall.oms.domain.OmsOrder;
import com.flyduck.mall.oms.domain.OmsOrderItem;
import com.flyduck.mall.oms.domain.OmsRefund;
import com.flyduck.mall.oms.api.constant.OrderConstant;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * AdminRefundDetailsRespVO
 * </p>
 *
 * @author flyduck
 * @since 2024-06-13
 */
@Data
public class AdminRefundDetailsRespVO implements Serializable {

    private OmsRefundVO refund;
    private OmsOrderVO order;



    @Data
    public static class OmsRefundVO extends OmsRefund implements Serializable{
        private String refundStatusStr;

        public String getRefundStatusStr() {
            return OrderConstant.RefundStatus.fromCode(getRefundStatus()).getDescription();
        }
    }

    @Data
    public static class OmsOrderVO extends OmsOrder implements Serializable{
        private List<OmsOrderItemVO> orderItems;
    }

    @Data
    public static class OmsOrderItemVO extends OmsOrderItem implements Serializable{
    }
}
